//
//  EJSOrderDetailStatusTableViewCell.m
//  EnjoyShoppingStreet
//
//  Created by lifayu on 2018/1/8.
//  Copyright © 2018年 lifayu. All rights reserved.
//

#import "EJSOrderDetailStatusTableViewCell.h"

@implementation EJSOrderDetailStatusTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)configCellWithOrderStatus:(NSString *)orderStatus orderStatusText:(NSString *)orderStatusText expressCorpName:(NSString *)expressCorpName expressNo:(NSString *)expressNo {
    self.statusLabel.text = orderStatusText;
    
    if(expressCorpName && expressNo){
        self.logisticsLabel.hidden = NO;
        self.logisticsLabel.text = [NSString stringWithFormat:@"物流信息：%@\n单号：%@",expressCorpName,expressNo];
    }else{
        self.logisticsLabel.hidden = YES;
    }
    
    if(orderStatus.intValue == -1){
        self.statusImageView.image = [UIImage imageNamed:@"已取消"];
    }else if(orderStatus.intValue == 1){
        self.statusImageView.image = [UIImage imageNamed:@"待付款"];
    }else{
        self.statusImageView.image = [UIImage imageNamed:@"已完成"];
    }
}

@end
